<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>对象常用方法</h2>
</body>
<script>
    const obj1={name:'jack',age:20}
    const obj2={address:'北京',sex:'男',age:30}

    //Object.assign属于浅拷贝
  //  const result=Object.assign({},obj1,obj2);
  //展开操作符也是属于浅拷贝
   // const result={...obj1,...obj2};

  //  console.log('result:',result)
  //let obj3={}
 // console.log('obj3:',obj3)
 let obj3=Object.create(null)
 obj3.name='张三'

 Object.prototype.play=function() {
    console.log('找我啊')
 }

   obj3.play()

</script>
</html>